<?php

// How to call function dynamically
$funArray = array('add','sub','mul','div');
//shuffle($funArray);
//echo $funArray[0](20,5);
$max = count($funArray)-1;

$function = rand(0,$max);
echo $funArray[$function];
echo $funArray[$function](20,5);//caalling dynamically


function add($a,$b){
  return $a+$b;
}

function sub($a,$b){
  return $a-$b;
}

function mul($a,$b){
  return $a*$b;
}

function div($a,$b){
  return $a/$b;
}


echo "\n\n\n";
